[#ftl]
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <!-- Sidebar Menu -->
        <ul class="sidebar-menu">
            <li class="header">后台管理系统</li>
            <!-- Optionally, you can add icons to the links -->
            <li [#if sidebar == "main"]class="active"[/#if]><a href="/main"><i class="fa fa-dashboard"></i>
                <span>控制台首页</span></a></li>
        [@shiro.hasPermission name="customers:view"]
            <li [#if treeview == "customer"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-user-md"></i> <span>用户管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="customers:view"]
                        <li [#if sidebar == "customers"]class="active"[/#if]><a href="/customers"><i class="fa fa-user"></i>用户列表</a>
                        </li>
                        <li [#if sidebar == "appeals"]class="active"[/#if]><a href="/appeals"><i class="fa fa-question"></i>申诉列表</a>
                        </li>
                        <li [#if sidebar == "feedbacks"]class="active"[/#if]><a href="/feedbacks"><i class="fa fa-comment-o"></i>反馈列表</a>
                        </li>
                        <li [#if sidebar == "device"]class="active"[/#if]><a href="/device"><i class="fa fa-mobile"></i>设备列表</a>
                        </li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
        [@shiro.hasPermission name="customers:view"]
            <li [#if treeview == "contracts"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-balance-scale"></i> <span>合同管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="customers:view"]
                        <li [#if sidebar == "contracts"]class="active"[/#if]><a href="/contracts"><i class="fa fa-file-text-o"></i>合同列表</a>
                        </li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
        [@shiro.hasPermission name="payrecord:view"]
            <li [#if treeview == "payrecord"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-indent"></i> <span>订单管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="payrecord:view"]
                        <li [#if sidebar == "orders"]class="active"[/#if]><a href="/orders"><i class="fa fa-credit-card"></i>订单列表</a>
                        </li>
                        <li [#if sidebar == "payrecord"]class="active"[/#if]><a href="/payrecord"><i class="fa fa-archive"></i>支付记录</a>
                        </li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
        [@shiro.hasPermission name="system:view"]
            <li [#if treeview == "trade"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-gears"></i> <span>交易管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="system:sys_role:list"]
                        <li [#if sidebar == "rates"]class="active"[/#if]><a href="/rates"><i class="fa fa-yen"></i>费率管理</a>
                        </li>
                        <li [#if sidebar == "restrictions"]class="active"[/#if]><a href="/restrictions"><i class="fa fa-anchor"></i>交易限制</a>
                        </li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
        [@shiro.hasPermission name="system:view"]
            <li [#if treeview == "content"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-indent"></i> <span>内容管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="system:sys_role:list"]
                        <li [#if sidebar == "posts"]class="active"[/#if]><a href="/posts"><i class="fa fa-flag"></i>社区管理</a>
                        </li>
                        <li [#if sidebar == "FakeUsers"]class="active"[/#if]><a href="/FakeUsers"><i class="fa fa-flag"></i>假用户管理</a>
                        </li>
                        <li [#if sidebar == "banners"]class="active"[/#if]><a href="/banners"><i class="fa fa-flag"></i>Banner管理</a>
                        </li>
                        <li [#if sidebar == "contentsIndex"]class="active"[/#if]><a href="/contents/index"><i class="fa fa-bell"></i>首页推荐</a>
                        </li>
                        <li [#if sidebar == "contents"]class="active"[/#if]><a href="/contents"><i class="fa fa-bell"></i>文章管理</a>
                        </li>
                        <li [#if sidebar == "qas"]class="active"[/#if]><a href="/qas"><i class="fa fa-bell"></i>常见问题</a>
                        </li>
                        <li [#if sidebar == "messages"]class="active"[/#if]><a href="/messages"><i class="fa fa-bell"></i>消息列表</a>
                        </li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
            <li [#if treeview == "userInfo"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-user-secret"></i> <span>个人信息</span> <i
                        class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    <li [#if sidebar == "changePassword"]class="active"[/#if]><a href="/changePassword"><i
                            class="fa fa-user"></i>修改密码</a></li>
                </ul>
            </li>
        [@shiro.hasPermission name="system:view"]
            <li [#if treeview == "system"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-cog"></i> <span>系统管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="system:sys_user:list"]
                        <li [#if sidebar == "users"]class="active"[/#if]><a href="/users"><i class="fa fa-user"></i>员工管理</a>
                        </li>
                    [/@shiro.hasPermission]
                    [@shiro.hasPermission name="system:sys_role:list"]
                        <li [#if sidebar == "roles"]class="active"[/#if]><a href="/roles"><i
                                class="fa fa-list"></i>角色管理</a></li>
                    [/@shiro.hasPermission]
                    [@shiro.hasPermission name="system:sys_permission:list"]
                        <li [#if sidebar == "permissions"]class="active"[/#if]><a href="/permissions"><i
                                class="fa fa-list"></i>权限列表</a></li>
                    [/@shiro.hasPermission]
                    [@shiro.hasPermission name="system:sys_log:list"]
                        <li [#if sidebar == "syslogs"]class="active"[/#if]><a href="/syslogs"><i
                                class="fa fa-list-alt"></i>操作日志</a></li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>